const { DataTypes } = require("sequelize");
const seq = require("../db/seq.js");
const Configs = seq.define(
  "configs",
  {
    configId: {
      type: DataTypes.INTEGER,
      allowNull: false,
      autoIncrement: true,
      primaryKey: true,
      comment: "配置ID",
    },
    company: {
      type: DataTypes.STRING(100),
      allowNull: false,
      defaultValue: 10,
      comment: "公司名称",
    },
    descript: {
      type: DataTypes.STRING(300),
      allowNull: false,
      defaultValue: 10,
      comment: "公司简介",
    },
    len: {
      type: DataTypes.INTEGER,
      allowNull: false,
      defaultValue: 0,
      comment: "光缆总长",
    },
    watchLen: {
      type: DataTypes.INTEGER,
      allowNull: false,
      defaultValue: 120,
      comment: "己监视光缆总长",
    },
    locatorLen: {
      type: DataTypes.INTEGER,
      allowNull: false,
      defaultValue: 1,
      comment: "定位器总长",
    },
    dataFlag: {
      type: DataTypes.TINYINT,
      allowNull: false,
      defaultValue: 1,
      comment: "是否有效",
    },
    /* isLimit: {
      type: DataTypes.TINYINT,
      allowNull: false,
      defaultValue: 1,
      comment:
        "是否开启销售订单总量限制，如果开启时，每次销售过磅，都会读取订单中的物资总量，与过磅单中的总量进行对比，如果超出则不允许过磅",
    },
    :{
      type:DataTypes.,
      allowNull:false,
      defaultValue:"",
      comment:""
    },
    :{
      type:DataTypes.,
      allowNull:false,
      defaultValue:"",
      comment:""
    },
    :{
      type:DataTypes.,
      allowNull:false,
      defaultValue:"",
      comment:""
    },
    :{
      type:DataTypes.,
      allowNull:false,
      defaultValue:"",
      comment:""
    },
    :{
      type:DataTypes.,
      allowNull:false,
      defaultValue:"",
      comment:""
    },
    :{
      type:DataTypes.,
      allowNull:false,
      defaultValue:"",
      comment:""
    },
    :{
      type:DataTypes.,
      allowNull:false,
      defaultValue:"",
      comment:""
    } */
  },
  {
    freezeTableName: true,
    timestamps: false,
  }
);

module.exports = Configs;
